import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    style: 'chalk'//vintage
  },
  mutations: {
    CHANGE_STYLE(state) {
      if (state.style == 'chalk') {
        state.style = "vintage"
      } else {
        state.style = 'chalk'
      }
    }
  },
  actions: {
    CHANGE_STYLE_ACTION({ commit }) {
      commit("CHANGE_STYLE")
    }
  },
})
